<template>
	<view class="cover_wrapper">
		<view class="img_wrapper">
			<image :src="url" mode="heightFix" :class="type?'img2': 'img1'"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: '',
				type: false
			}
		},
		onLoad(e) {
			this.url = e.url;
			if (e.type) {
				this.type = e.type;
			}
		}
	}
</script>

<style lang="less">
	.cover_wrapper {
		width: 100%;
		min-height: 100vh;
		background-color: #222;
		overflow: hidden;

		.img_wrapper {
			width: 702rpx;
			height: 490rpx;
			margin: 166rpx auto 30rpx;
			background-color: #fff;
		}

		.img1 {
			width: 351rpx;
			height: 100%;
			margin: 0 0 0 auto;
		}

		.img2 {
			width: 100%;
			height: 100%;
		}
	}
</style>